<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>


<body>

  <script src="./js/my.js"></script>
  <!-- 内部js -->
  <script>
    // 单行注释 ctrl + /
    /* 多行注释 shift + option + A  */
    // alert('Hello World');
    document.write('<h2>Hello World</h2>');
    console.log('Hello World');

    // 输入语句
    // prompt('请输入你的名字');

    // let生命变量
    let age = 18;
    /* let name = prompt('请输入你的名字');
    console.log(name); */
    let name_2 = prompt('请输入你的名字');

    let nums = [1, 2, 3, 4, 5];

    let obj = {
      name: '张三',
      age: 18,
      sex: '男',
      height: 1.88,
      weight: 80,
      say: function () {
        console.log('我是一个方法');
      }
    }
    console.log(obj);

    const gender = '男';
    console.log(gender);

  </script>

</body>

</html>